linq top selling products

91

linq top selling products -

1.
2.
var query =
3.
    (from item in OrderedItem
4.
    group item.Qty by item.Product into g
5.
    orderby g.Sum() descending
6.
    select g.Key).Take(5); // get the top 5 orders
7.

linq top selling products -

var query =
    (from item in OrderedItem
    group item.Qty by item.Product into g
    orderby g.Sum() descending
    select g.Key).Take(5); // get the top 5 orders

Comments

Submit
0 Comments